<script setup lang="ts">
interface Ipops {
  isIconShow?: boolean;
  title: string;
  pointColor?: string;
}
const props = defineProps<Ipops>();
</script>
<template>
  <div class="aside">
    <div class="title-box">
      <div class="title-icon" v-show="props?.isIconShow">
        <!-- <img src="../../assets/images/logo.png" alt="" /> -->
        <slot name="titleIcon">
          <img src="../../assets/images/logo.png" alt="" />
        </slot>
      </div>
      <div class="tilte">{{ props.title }}</div>
      <div class="more">
        <span>全部</span>
        <svg
          t="1688361570794"
          class="icon"
          viewBox="0 0 1024 1024"
          version="1.1"
          xmlns="http://www.w3.org/2000/svg"
          p-id="1208"
        >
          <path
            d="M557.179 904c-8.189 0-16.379-3.124-22.628-9.372-12.496-12.497-12.496-32.759 0-45.256L871.924 512 534.551 174.627c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0l360 360c12.496 12.497 12.496 32.758 0 45.255l-360 360c-6.249 6.249-14.439 9.373-22.628 9.373z"
            p-id="1209"
            fill="currentcolor"
          ></path>
        </svg>
      </div>
    </div>
    <div class="content">
      <slot name="content">
        <ul class="list">
          <li v-for="item in 3" :key="item">
            <span class="point" :style="{ backgroundColor: props?.pointColor }"></span>
            <span class="text">关于延长北京大学国际医院放假的通知</span>
          </li>
        </ul>
      </slot>
      <!-- <slot name="content"></slot> -->
    </div>
  </div>
</template>
<style scoped lang="scss">
.aside {
  margin-bottom: 25px;
  .title-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    .title-icon {
      img {
        width: 16px;
        height: 16px;
      }
    }
    .tilte {
      letter-spacing: 1px;
      font-weight: 700;
      color: #333;
      font-size: 16px;
    }
    .more {
      color: #999;
      display: flex;
      font-size: 14px;
      align-items: center;
      cursor: pointer;
      justify-content: center;
      .icon {
        color: #4490f1;
        width: 14px;
        height: 14px;
      }
    }
  }
  .content {
    .list {
      li {
        margin-left: 10px;

        width: 100%;
        padding: 10px 0;
        display: flex;
        align-items: center;
        justify-content: center;

        &:hover {
          color: var(--text-hover-color);
        }
        span.point {
          display: block;
          width: 5px;
          height: 5px;
          background-color: var(--text-hover-color);
          border-radius: 5px;
          margin: 0 10px;
        }
        span.text {
          flex: 1;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          -webkit-line-clamp: 1;
          -webkit-box-orient: vertical;
          word-break: break-all;
        }
      }
    }
  }
}
</style>
